<?php
$SQL[] = "CREATE TABLE market_wages (
  w_id mediumint(8) NOT NULL auto_increment,
  to_who enum('m','g') NOT NULL default 'm',
  id_who mediumint(8) NOT NULL default '0',
  how_much bigint(19) NOT NULL default '0',
  next_payment int(10) NOT NULL default '0',
  w_how tinyint(1) NOT NULL default '0',
  w_when int(10) NOT NULL default '0',
  w_day mediumint(3) NOT NULL default '0',
  w_hour smallint(2) NOT NULL default '0',
  w_minute smallint(2) NOT NULL default '0',
  PRIMARY KEY  (w_id)
);";

$SQL[] = "CREATE TABLE market_wages_collected (
  c_id int(10) NOT NULL auto_increment,
  time_collected int(10) NOT NULL default '0',
  to_who enum('m','g') NOT NULL default 'm',
  id_who mediumint(8) NOT NULL default '0',
  how_much bigint(19) NOT NULL default '0',
  PRIMARY KEY  (c_id)
);";

$SQL[] = "CREATE TABLE market_reward_logs (
  l_id int(10) NOT NULL auto_increment,
  member_id mediumint(8) NOT NULL default '0',
  l_time int(10) NOT NULL default '0',
  location varchar(255) NOT NULL default '',
  l_amount int(10) NOT NULL default '0',
  PRIMARY KEY  (l_id)
);";

$SQL[] = "ALTER TABLE market_items ALTER base_price base_price bigint(19) NOT NULL DEFAULT '0'";
$SQL[] = "ALTER TABLE market_items ALTER base_resell base_resell bigint(19) NOT NULL DEFAULT '0'";

$SQL[] = "ALTER TABLE market_inventory ALTER price_bought price_bought bigint(19) NOT NULL DEFAULT '0'";
$SQL[] = "ALTER TABLE market_inventory ALTER resell_price resell_price bigint(19) NOT NULL DEFAULT '0'";
$SQL[] = "ALTER TABLE market_inventory ADD settings text NOT NULL";

?>